﻿@using SCMS.Resource
@{    
    ViewBag.Title = Resources.GoodsReceivedNote_RegisterAsset_Title;
    Layout = "~/Views/Shared/_GeneralLayout.cshtml";
}
<!-- FineUploader -->
<link href="@Url.Content("~/Content/css/fineuploader.css")" rel="stylesheet"/>
<script src="@Url.Content("~/Scripts/fineuploader/jquery.fineuploader-3.0.min.js")" type="text/javascript"></script>

<div id="GRNMain" class="contentMain">
    <div class="contentHeader">
        <div class="headerText">
            <h3 class="title-left">
                @Resources.GoodsReceivedNote_RegisterAsset_Header</h3>
        </div>
        <div style="font-size: 12px; text-align: left;">
            <table cellpadding="0" cellspacing="0" width="83%">
                <tr>
                    <td class="arrowLink" style="width:27%;">
                        @Ajax.ActionLink(Resources.GoodsReceivedNote_RegisterAsset_RegisterAssetFromGRN, "ViewUnregisteredAssets", new AjaxOptions
                   {
                       UpdateTargetId = "AssetsDiv",
                       LoadingElementId = "loading",
                       OnSuccess = "document.getElementById('AssetDetailsDiv').innerHTML=''; if (document.getElementById('table') != null) {initSorter();sorter.size(20);}"
                   })
                    </td>
                    <td class="arrowLink" style="width:27%;">
                        @Ajax.ActionLink(Resources.GoodsReceivedNote_RegisterAsset_RegisterExistingAssets, "LoadOtherAssets", new AjaxOptions
                        {
                            UpdateTargetId = "AssetsDiv",
                            LoadingElementId = "loading",
                            OnSuccess = "ClearOtherAssetForm();initFineUploader('/GoodsReceivedNote/HandleImageUpload');document.getElementById('AssetDetailsDiv').innerHTML='';"
                        })
                    </td>
                    <td class="arrowLink" style="width:27%;">
                        @Ajax.ActionLink(Resources.GoodsReceivedNote_RegisterAsset_ViewAssetInventory, "ViewAssetInventory", "Inventory", new AjaxOptions
                        {
                            UpdateTargetId = "AssetsDiv",
                            LoadingElementId = "loading",
                            OnSuccess = "document.getElementById('AssetDetailsDiv').innerHTML='';if (document.getElementById('table') != null) {initSorter();sorter.size(20);}"
                        })
                    </td>
                </tr>
                <tr>                    
                    <td class="arrowLink">
                        @Ajax.ActionLink(Resources.GoodsReceivedNote_RegisterAsset_ViewAssetDepreciation, "LoadAssetDepreciation", "Inventory", new AjaxOptions
                        {
                            UpdateTargetId = "AssetsDiv",
                            LoadingElementId = "loading",
                            OnSuccess = "document.getElementById('AssetDetailsDiv').innerHTML='';"
                        })
                    </td>
                    <td class="arrowLink">
                        @Ajax.ActionLink(Resources.GoodsReceivedNote_RegisterAsset_RegisterExistingCons, "LoadOtherConsumables", new AjaxOptions
                        {
                            UpdateTargetId = "AssetsDiv",
                            LoadingElementId = "loading",
                            OnSuccess = "ClearFormById('#' + 'otherConsumable');document.getElementById('AssetDetailsDiv').innerHTML='';if (document.getElementById('table') != null) {initSorter();sorter.size(20);}"
                        })
                    </td>
                    <td class="arrowLink">
                        @Ajax.ActionLink(Resources_morgan.GoodsReceivedNote_RegisterAsset_ManageAssets, "AssetManagement", new AjaxOptions
                        {
                            UpdateTargetId = "AssetsDiv",
                            LoadingElementId = "loading",
                            OnSuccess = "ClearFormById('#' + 'otherConsumable');document.getElementById('AssetDetailsDiv').innerHTML='';if (document.getElementById('table') != null) {initSorter();sorter.size(20);}"
                        })
                    </td>
                </tr>
            </table>
        </div>
    </div>
    <br />
    <div id="loading" style="display: none; color: Blue; font-weight: bold;">
        <img src="../../Content/images/loading_indicator.gif" alt="@Resources.Global_String_Processing" />
    </div>
    <div id="AssetsDiv" style="padding-left: 2px;">
        <!-- Content goes here-->
        @Html.Action("ViewAssetInventory", "Inventory")
    </div>
    <div id="AssetDetailsDiv" style="padding-left: 2px;">
        <!-- Content goes here-->
    </div>
</div>
<script type="text/javascript">
    $(document).ready(function () {
        if (document.getElementById('table') != null) {
            initSorter();
            sorter.size(20);
        }
    });
</script>
